package com.zyt.springboot.test20241220;

import com.google.common.collect.Lists;

import java.util.List;

public class Test {
        public static void main(String[] args) {
            List<String> list = Lists.newArrayList("a","a","b","c");
            for (int i = 0, s = list.size();i < s;i++) {
                if ("a".equals(list.get(i))) {
                    list.remove(list.get(i));
                }
            }
            System.out.println(list);
        }
}
